﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;

namespace NotificationSample
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        NotificationWindow _nw;
        FootballControl _football = new FootballControl();
        int _goals;

        private void _showInfo_Click(object sender, RoutedEventArgs e)
        {
            if (_nw == null)
            {
                _nw = new NotificationWindow();
            }

            _nw.Content = _football;
            _nw.Width = 220.0;
            _nw.Height = 100;
            _nw.Show(5000);

            DispatcherTimer _timer = new DispatcherTimer();
            _timer.Interval = new TimeSpan(0, 0, 15);
            _timer.Tick += (s, e1) =>
                {
                    _goals++;
                    _football.Team1 = _goals.ToString();
                    _nw.Show(5000);
                };
            _timer.Start();

            //using CoolWindowsFeatures;
            
            //if (windowsCoding == tooComplicated)
            //    DownloadDemos("http://win7togo.codeplex.com");
            
            //Windows7App yourWindowsApp = CreateNewCrazyWinApp();
            
            //foreach(var coolFeature in yourWindowsApp)
            //    chanceToWin++;
            
            //if (yourWindowsApp.Crazyness == highFun &&
            //    yourWindowsApp.LinesOfCode <= tooMuchCode &&
            //    yourWindowsApp == Highscore)
            //    FlyTo(LasVegas);

            //StartCodingForWindows7(now);
        }
    }
}
